public class Test {
	public static void main(String[] args) {
    CPU cpu=new CPU(); //创建CPU对象cpu
    cpu.speed=2200; //设置cpu的速度为2200
    HardDisk disk=new HardDisk();
    disk.amount=200; //设置disk的容量为200
    PC pc=new PC();
    pc.setCPU(cpu);
    pc.setHardDisk(disk);
    pc.show();
    cpu.speed=20000;
    disk.amount=400;
    pc.set(cpu,disk);
    pc.show();
	}
}
